package com.leapp.sk.binder
import com.example.mvp.binder.BaseDataBinder
import com.leapp.sk.bean.MainTabObj
import com.leapp.sk.viewdelegate.MainTableDelegate
/**
 * 数据绑定
 * @author  chaohaipeng  on 2018/7/2.
 */
class MaintableDataBinder : BaseDataBinder<MainTableDelegate, MainTabObj>{
    override fun viewBindModel(viewDelegate: MainTableDelegate?, data: MainTabObj?) {
        if (data?.mainTabIconArray!=null&&data.fragmentArray!=null&&data.mainTabTextArray!=null){
            viewDelegate?.initTab(data.mainTabIconArray,data.fragmentArray,data.mainTabTextArray)
        }
    }
    override fun getDataClass(): Class<MainTabObj> {
        return MainTabObj::class.java
    }

}